﻿Imports System.Linq
Imports TNCDAL

Public Class RecentBackupController
    Private objRepository As New RecentBackupRepository

    Public Function GetTop10RecentBackupList() As IQueryable(Of tblRecentBackup)
        Dim localDataTable = objRepository.GetTop10RecentBackupList()
        Return localDataTable
    End Function

    'Public Sub Insert(ByVal obj As tblRecentBackup)
    '    objRepository.Insert(obj)
    'End Sub

    Public Sub Insert(ByVal backupFile As String)
        'Insert recent backup
        Dim objRecentBackup As New tblRecentBackup
        objRecentBackup.CreatedDate = Date.Now
        objRecentBackup.ID_User = GeneralClassBAL._User.ID_User
        objRecentBackup.BackupFile = backupFile
        objRepository.Insert(objRecentBackup)
    End Sub


End Class
